package zero.tech.games.gate.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import zero.tech.games.entity.games.CfGame;
import zero.tech.games.entity.games.ClubGame;

public interface ClubGameMapper {

	@Select("select t2.* from club_game t1 left join cf_game t2 on t1.game_id=t2.game_id where t1.club_id=#{club_id}")
	List<CfGame> loadClubGames(@Param("club_id")int club_id);

	@Select("select * from club_game where club_id=#{club_id} and game_id=#{game_id}")
	ClubGame getClubGame(@Param("club_id")int club_id, @Param("game_id")int game_id);

	@Insert("insert into club_game(club_id,game_id) values(#{club_id},#{game_id})")
	void insert(ClubGame clubGame);

}
